<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>会员信息</title>
<!-- Bootstrap -->
<link href="/carworld_weixin/css/bootstrap.min.css" rel="stylesheet">
<link href="/carworld_weixin/css/style.css" rel="stylesheet">
<link href="/carworld_weixin/css/response.css" rel="stylesheet">
</head>
<body>
	<div class="maincont">
		<header>
			<a href="javascript:history.back(-1)" class="back-off fl"><span
				class="glyphicon glyphicon-menu-left"></span></a>
			<div class="head-mid">
				<h1>完善会员信息</h1>
			</div>
		</header>
		 <div class="head-top">
			 <img src="/carworld_weixin/images/head_banner.png" width="100%"/>
		</div> 
		<!--head-top/-->
		<form class="reg-login">
		<h3 style="text-align:center;"><strong>完善信息即可完成会员注册</strong></h3>
			
			<div class="lrBox">
				<div class="lrList">
					<input id="userName" type="text" class="form-control"
						placeholder="输入您的名字" />
				</div>
				<div class="lrList">
					<input id="mobile" type="text" class="form-control"
						placeholder="输入您的手机号，无需短信验证码" />
				</div>
			</div>
			<!--lrBox/-->
			<div class="lrSub">
				<input id="validateBtn" type="button" value="提交" />
			</div>
		</form>
		<!--reg-login/-->
		<div class="height1"></div>
	</div>
	<!--maincont-->

	<script src="/carworld_weixin/js/jquery.min.js"></script>
	<script src="/carworld_weixin/js/bootstrap.min.js"></script>

	<script src="/carworld_weixin/js/style.js"></script>
	<script>
		$('#validateBtn').click(function() {
			var userName = $('#userName').val();
			var mobile = $('#mobile').val();
			
			if (userName == null) {
				alert('用户名不能为空');
				return;
			}
			if (mobile == null) {
				alert('手机号不能为空');
				return;
			}
			
			$.ajax({
				type : 'POST',
				url : '/carworld_weixin/user/supplyUserInfo',
				data : {
					'userName' : userName,
					'mobile' : mobile,
					'carLicense' : ""
				},
				dataType : 'text',
				success : function(result) {
					if(result=='success'){
						alert('完善成功，查看您的会员卡吧~');
					}else{
						alert('信息补充失败，请联系管理员~');
						window.location.href='/carworld_weixin/';
					}
				},
				error : function(jqXHR, textStatus, errorThrown) {
					alert(textStatus);
					
				}
			});

		})
	</script>


</body>
</html>
